I am getting inconsistent limit switch and following error behavior while tuning.
I am using the opto-ins on the kanalog for the limit switches. With the limit switches configured to stop movement, negative bit as the actual limit switch bit (both + and -) positive bit as the estop bit. Looking at the digital I/O window I see all switches are active (configured for active low).
When I try to make a move in the step response window I will get negative switch axis disabled, consistently only for a single axis. Rebooting the kflop changes the axis which gets disabled sometimes.
On the following error, with the following error max set to 256 for all axis's, the actual drives powered off and the max error set to 300. Only axis 2 disables with a following error um error.
I would expect it to be consistent for all the drives.
Any thoughts?
here is the init that I am building.
All the axis are set the same because I have only tuned one axis so far and am trying to overcome this inconsistent behavior before I continue.
main()
{
// SetSoftLim(0);
ch0->SoftLimitPos= 10000;
ch0->SoftLimitNeg=-10000;
ch1->SoftLimitPos=10000;
ch1->SoftLimitNeg=-10000;
ch2->SoftLimitPos=10000;
ch2->SoftLimitNeg=-10000;
DefineCoordSystem(0,1,2,-1);
ch0->InputMode=ENCODER_MODE;
ch0->OutputMode=DAC_SERVO_MODE;
ch0->Vel=200000.000000;
ch0->Accel=550000.000000;
ch0->Jerk= 18000000.000000;
ch0->P=12.26;
ch0->I=.0006;
ch0->D=105;
ch0->FFAccel=0.0003;
ch0->FFVel=0.008;
ch0->MaxI=200.000000;
ch0->MaxErr=100.000000;
ch0->MaxOutput=1000.000000;
ch0->DeadBandGain=0.000000;
ch0->DeadBandRange=4.000000;
ch0->InputChan0=0;
ch0->InputChan1=0;
ch0->OutputChan0=0;
ch0->OutputChan1=0;
ch0->LimitSwitchOptions=12f;
ch0->LimitSwitchNegBit=138;
ch0->LimitSwitchPosBit=139;
ch0->InputGain0=1.000000;
ch0->InputGain1=1.000000;
ch0->InputOffset0=0.000000;
ch0->InputOffset1=0.000000;
ch0->MaxFollowingError=256.000000;
ch0->iir[0].B1=0.000000;
ch0->iir[0].B2=0.000000;
ch0->iir[0].A1=0.000000;
ch0->iir[0].A2=0.000000;
ch0->iir[1].B0=1.000000;
ch0->iir[1].B1=0.000000;
ch0->iir[1].B2=0.000000;
ch0->iir[1].A1=0.000000;
ch0->iir[1].A2=0.000000;
ch0->iir[2].B0=0.056495;
ch0->iir[2].B1=0.112989;
ch0->iir[2].B2=0.056495;
ch0->iir[2].A1=1.225650;
ch0->iir[2].A2=-0.451634;
ch1->InputMode=ENCODER_MODE;
ch1->OutputMode=DAC_SERVO_MODE;
ch1->Vel=200000.000000;
ch1->Accel=550000.000000;
ch1->Jerk= 18000000.000000;
ch1->P=12.26;
ch1->I=.0006;
ch1->D=105;
ch1->FFAccel=0.0003;
ch1->FFVel=0.008;
ch1->MaxI=200.000000;
ch1->MaxErr=100.000000;
ch1->MaxOutput=1000.000000;
ch1->DeadBandGain=0.000000;
ch1->DeadBandRange=4.000000;
ch1->InputChan0=1;
ch1->InputChan0=1;
ch1->InputChan1=1;
ch1->OutputChan0=1;
ch1->OutputChan1=1;
ch1->LimitSwitchOptions=12f;
ch1->LimitSwitchNegBit=137;
ch1->LimitSwitchPosBit=139;
ch1->InputGain0=1.000000;
ch1->InputGain1=1.000000;
ch1->InputOffset0=0.000000;
ch1->InputOffset1=0.000000;
ch1->MaxFollowingError=256.000000;
ch1->iir[0].B1=0.000000;
ch1->iir[0].B2=0.000000;
ch1->iir[0].A1=0.000000;
ch1->iir[0].A2=0.000000;
ch1->iir[1].B0=1.000000;
ch1->iir[1].B1=0.000000;
ch1->iir[1].B2=0.000000;
ch1->iir[1].A1=0.000000;
ch1->iir[1].A2=0.000000;
ch1->iir[2].B0=0.056495;
ch1->iir[2].B1=0.112989;
ch1->iir[2].B2=0.056495;
ch1->iir[2].A1=1.225650;
ch1->iir[2].A2=-0.451634;
ch2->InputMode=ENCODER_MODE;
ch2->OutputMode=DAC_SERVO_MODE;
ch2->Vel=200000.000000;
ch2->Accel=550000.000000;
ch2->Jerk= 18000000.000000;
ch2->P=12.26;
ch2->I=.0006;
ch2->D=105;
ch2->FFAccel=0.0003;
ch2->FFVel=0.008;
ch2->MaxI=200.000000;
ch2->MaxErr=100.000000;
ch2->MaxOutput=1000.000000;
ch2->DeadBandGain=0.000000;
ch2->DeadBandRange=4.000000;
ch2->InputChan0=2;
ch2->InputChan1=2;
ch2->OutputChan0=2;
ch2->OutputChan1=2;
ch2->LimitSwitchOptions=12f;
ch2->LimitSwitchNegBit=136;
ch2->LimitSwitchPosBit=139;
ch2->InputGain0=1.000000;
ch2->InputGain1=1.000000;
ch2->InputOffset0=0.000000;
ch2->InputOffset1=0.000000;
ch2->MaxFollowingError=256.000000;
ch2->iir[0].B1=0.000000;
ch2->iir[0].B2=0.000000;
ch2->iir[0].A1=0.000000;
ch2->iir[0].A2=0.000000;
ch2->iir[1].B0=1.000000;
ch2->iir[1].B1=0.000000;
ch2->iir[1].B2=0.000000;
ch2->iir[1].A1=0.000000;
ch2->iir[1].A2=0.000000;
ch2->iir[2].B0=0.056495;
ch2->iir[2].B1=0.112989;
ch2->iir[2].B2=0.056495;
ch2->iir[2].A1=1.225650;
ch2->iir[2].A2=-0.451634;
EnableAxisDest(Y,0); //y
EnableAxisDest(X,0); //z
EnableAxisDest(Z,0); //x
}